<?
	session_start(); 
	if(isset($_SESSION['id']) & isset($_SESSION['pass']))
	{
		require("koneksi.php");
		$kodedsn=$_POST['kodedsn'];
		$nama=$_POST['nama'];
		$query=mysql_query("insert into dosenwali values('$kodedsn','$nama')");
	
		if($query)
		{
			echo "Data berhasil ditambah<br>";
			echo "<a href='menu_dosen.php'>Back To Menu Dosen</a><br>";
			echo "<a href='menu_admin.php'>Back To Menu Admin<br></a>";
		}
		else
		{
			echo "Data gagal ditambah<br>";
			echo "<a href='menu_dosen.php'>Back To Menu Dosen</a><br>";
			echo "<a href='menu_admin.php'>Back To Menu Admin</a>";
		}
	}
	else
	header("Location:index.php");
	
?>	